{yun:}include file="$comstyle/header.htm"{/yun}
{yun:}include file="$tplstyle/public_search/index_search.htm"{/yun}
<div class="w1000">
	<div class="admin_mainbody">
	{yun:}include file="$comstyle/left.htm"{/yun}
 	<script src="{yun:}$config.sy_weburl{/yun}/data/plus/job.cache.js?v={yun:}$config.cachecode{/yun}" type="text/javascript"></script>
	<link rel="stylesheet" href="{yun:}$style{/yun}/style/newclass.public.css?v={yun:}$config.cachecode{/yun}" type="text/css">
	<script src="{yun:}$config.sy_weburl{/yun}/js/newclass.public.js?v={yun:}$config.cachecode{/yun}" type="text/javascript"></script> 
	<script src="{yun:}$config.sy_weburl{/yun}/js/lssave.js?v={yun:}$config.cachecode{/yun}" type="text/javascript"></script> 
    <script language="javascript">
	var saveid=$("#id").val();
	var start = 30;
	var step = -1;
	if(!saveid){
		function count(){
			$("#atime").click(function(){ start=30});
			document.getElementById("totalSecond").innerHTML = start;
			start += step;
			if(start < 0 ){
				savejobform();
				start = 30;
			}
			setTimeout("count()",1000);
		}
		window.onload = count;	
	}
	
	function toDate(str){
		var sd=str.split("-");
		return new Date(sd[0],sd[1],sd[2]);
	}
	
function CheckPost(){
 	if($.trim($("#name").val())==''){layer.msg('职位名称不能为空！',2,8);return false;}
 	if($.trim($("#people_number").val())==''){layer.msg('招聘人数不能为空！',2,8);return false;}
 	if($.trim($("#bounty").val())==''){layer.msg('赏金不能为空！',2,8);return false;}
	if($("#job_post").val()==''){layer.msg('岗位介绍不能为空！', 2, 8);return false;}
	if($("#cityid").val()==''){layer.msg('工作地点不能为空！', 2, 8);return false;}


	var people_number = $.trim($("#people_number").val());
	var bounty = $.trim($("#bounty").val());
	var job_pay = $.trim($("#job_pay").val());
	var job_money = bounty*people_number;
		if(job_money > job_pay){
			layer.msg('您的赏金不足以支付您的招聘发布,请充值赏金后发布', 2, 8);return false;
		}

		
	var minsalary=$.trim($("#minsalary").val());
	var maxsalary=$.trim($("#maxsalary").val());
	if($("#salary_type").attr("checked")!='checked'){
		if(minsalary==''||minsalary=='0'){
			layer.msg('请填写薪资待遇！', 2, 8);return false;
		}
		if(maxsalary){
			if(parseInt(maxsalary)<=parseInt(minsalary)){
				layer.msg('最高工资必须大于最低工资！', 2, 8);return false;
			}
		}
	}
	var description = editor.getContent();
	if($.trim(description)==''){layer.msg('职位描述不能为空！', 2, 8);return false;}
	
	var islink=$("input[name='islink']").val();
	var isemail=$("input[name='isemail']").val();
	if(!islink){
		layer.msg('请选择联系方式！', 2, 8);return false;
	}else if(islink==2){
		var link_man=$.trim($("input[name='link_man']").val());
		var link_moblie=$.trim($("input[name='link_moblie']").val());
 		if(link_man==''||link_moblie==''){
			layer.msg('联系人及联系电话均不能为空！', 2, 8);return false;
		}
		if(link_moblie&& (isjsMobile(link_moblie)==false && !isjsTell(link_moblie))){
			layer.msg('联系电话格式错误！', 2, 8);return false;
		}
	} 
	if(isemail=='2'){
		var email=$.trim($("input[name='email']").val());
		if(email==''){
			layer.msg('请输入邮箱！', 2, 8);return false;
		}else if(check_email(email)==false){
			layer.msg('新邮箱格式错误！', 2, 8);return false;
		} 
	}
	var index = layer.load('执行中，请稍候...',0);
} 
function choice(id,type){
	if(type=='link'||type=='email'){
		if(id==1){
			$("#is"+type+"3").removeClass('admin_job_style_n');
			$("#is"+type+"2").removeClass('admin_job_style_n');
			$("#is"+type+id).addClass('admin_job_style_n');
			$("input[name='is"+type+"']").val(id);
			$("#new"+type).hide();
			$("#tblink").val(2)
		}else if(id==2){
			$("#is"+type+"3").removeClass('admin_job_style_n');
			$("#is"+type+"1").removeClass('admin_job_style_n');
			$("#is"+type+id).addClass('admin_job_style_n');
			$("input[name='is"+type+"']").val(id);
			$("#new"+type).show();
		}else if(id==3){
			$("#is"+type+"1").removeClass('admin_job_style_n');
			$("#is"+type+"2").removeClass('admin_job_style_n');
			$("#is"+type+id).addClass('admin_job_style_n');
			$("input[name='is"+type+"']").val(id);
			$("#new"+type).hide();
		}
	}
}
function returnmessagejob(frame_id){ 
	if(frame_id==''||frame_id==undefined){
		frame_id='supportiframe';
	}
	var message = $(window.frames[frame_id].document).find("#layer_msg").val(); 
	if(message != null){
		var url=$(window.frames[frame_id].document).find("#layer_url").val();
		var layer_time=$(window.frames[frame_id].document).find("#layer_time").val();
		var layer_st=$(window.frames[frame_id].document).find("#layer_st").val();
		var layer_url = $(window.frames[frame_id].document).find("#layer_url").val();
		layer.closeAll('loading');
		if(layer_st=='9'){
			
			$('#jobid').val(layer_url);
				$.layer({
					type : 1,
					move:false,
					fix: true,
					zIndex:666,
					title : '系统提示', 
					border : [10 , 0.3 , '#000', true],
					area : ['480px','330px'],
					page : {dom : '#addjob'},
					close: function(){
						{yun:}if $config.com_job_status=='1'{/yun}
						window.location.href = "index.php?c=job&w=1";
						{yun:}else{/yun}
						window.location.href = "index.php?c=job&w=0";
						{yun:}/if{/yun}
					}
				});
		}else{
			if(url=='1'){
				layer.msg(message, layer_time, Number(layer_st),function(){window.location.reload();window.event.returnValue = false;return false;});
			}else if(url==''){

				layer.msg(message, layer_time, Number(layer_st));
			}else{
				layer.msg(message, layer_time, Number(layer_st),function(){window.location.href = url;window.event.returnValue = false;return false;});
			}
		} 
	}
}


</script>
<input type="hidden" id="comname" value="{yun:}$company.name{/yun}">
    <div class=right_box>
      <div class=admincont_box>
           <div class="com_tit"><span class="com_tit_span">新增职位</span></div>  
            <div class="com_body">
         <div class="admin_new_tip ">
        <div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
        <div class="admin_new_tip_list_cont">
          <div class="admin_new_tip_list"> 
          
			{yun:}if $statis.vip_etime > time() || $statis.vip_etime=="0"{/yun}
			
				{yun:}if $statis.rating_type==1{/yun}

					您当前是{yun:}$statis.rating_name{/yun}{yun:}if $jobnum{/yun} ，现已发布 {yun:}$jobnum{/yun} 条职位{yun:}/if{/yun}， 账号剩余职位数目：{yun:}$statis.job_num{/yun}条

				{yun:}else if $statis.rating_type==2{/yun}

					您当前是{yun:}$statis.rating_name{/yun}，到期时间是{yun:}if $statis.vip_etime!="0"{/yun}{yun:}$statis.vip_etime|date_format:'%Y-%m-%d'{/yun}{yun:}else{/yun}永久{yun:}/if{/yun}，在此之前您可以任意发布职位

				{yun:}else if $statis.rating_type==0{/yun}

					您当前是{yun:}$statis.rating_name{/yun}{yun:}if $jobnum{/yun} ，现已发布 {yun:}$jobnum{/yun} 条职位{yun:}/if{/yun}， 账号剩余职位数目：{yun:}$statis.job_num{/yun} 条

				{yun:}/if{/yun}

            {yun:}else{/yun}

				您的会员已到期，为了更好的招聘人才，请先<a href="index.php?c=right" class="cblue"> 升级会员</a>！
			
			{yun:}/if{/yun}
			
		</div>
          {yun:}if $save{/yun}
         
          <div id="forms"class="admin_new_tip_list">您有上次未提交成功的数据 <a href="javascript:;" onclick="savejob();" class="f60">恢复数据</a> </div>
          {yun:}/if{/yun} </div>
      </div>
        <iframe id="supportiframejob"  name="supportiframejob" onload="returnmessagejob('supportiframejob');" style="display:none"></iframe>
        <form name="MyForm" target="supportiframejob" method="post" action="index.php?c=jobadd&act=save" onsubmit="return CheckPost();" class="layui-form">
    
           <div class="com_release_box">
		<ul>
			<li>
				 <div class="com_release_name"><i class="ff0">*</i> 职位名称</div>
			 <div class="com_release_cont">
             <div class="com_release_cont_text">
             		<input type="hidden" name="job_pay" id='job_pay' value="{yun:}$job_pay{/yun}" >
					<input type="text" size="45" lay-verify="required" name="name" id='name' value="{yun:}$row.name{/yun}" class="layui-input">
                    </div>
  					<span id="by_name" class="errordisplay">职位名不能为空</span> </div>
            </li>
            <li>
				 <div class="com_release_name"><i class="ff0">*</i> 招聘人数</div>
			 <div class="com_release_cont">
             <div class="com_release_cont_text">
             		{yun:}if $row.people_number{/yun}
					<input type="hidden"  name="people_number" id='people_number' value="{yun:}$row.people_number{/yun}">
					<div style="height: 38px;line-height: 38px;">
						{yun:}$row.people_number{/yun}
					</div>
             		

             		{yun:}else{/yun}
             		<input type="number" size="45" lay-verify="required" name="people_number" id='people_number' min="1" value="{yun:}$row.people_number{/yun}" class="layui-input" onkeyup="this.value=this.value.replace(/[^\d]/g,'');">
                    </div>
             		{yun:}/if{/yun}	
             		<span id="by_people_number" class="errordisplay">招聘人数不能为空</span> </div>
            </li>
			<li>
				 <div class="com_release_name"><i class="ff0">*</i> 赏金</div>
			 <div class="com_release_cont">
             <div class="com_release_cont_text">
             		{yun:}if $row.bounty{/yun}
					<input type="hidden"  name="bounty" id='bounty' value="{yun:}$row.bounty{/yun}">
					<div style="height: 38px;line-height: 38px;">
						{yun:}$row.bounty{/yun}
					</div>
             		

             		{yun:}else{/yun}
             		<input type="number" size="45" lay-verify="required" name="bounty" id='bounty' min="1" value="{yun:}$row.bounty{/yun}" class="layui-input" onkeyup="this.value=this.value.replace(/[^\d]/g,'');">
                    </div>
             		{yun:}/if{/yun}	
             		<span id="by_bounty" class="errordisplay">赏金不能为空</span> </div>
            </li>	

            <li>
	        <div class="com_release_name"><i class="ff0">*</i> 岗位介绍</div>
			  <div class="com_release_cont">
              <div class="com_release_cont_text">
			   <input type="hidden" name="job_post" id="job_post" value="{yun:}if $row.job_post{/yun}{yun:}$row.job_post{/yun}{yun:}else{/yun}{yun:}$row.job1_son{/yun}{yun:}/if{/yun}"/>
 				<input class="layui-input layui_input_bg" type="button" id="workadds_job"   value="{yun:}if $job_name[$row.job_post]{/yun}{yun:}$job_name[$row.job_post]{/yun}{yun:}elseif $job_name[$row.job1_son]{/yun}{yun:}$job_name[$row.job1_son]{/yun}{yun:}else{/yun}请选择岗位介绍{yun:}/if{/yun}" onclick="index_job_new(1,'#workadds_job','#job_post','left:100px;top:100px; position:absolute;','1');" readonly="readonly" />
                </div>
				</div>
			</li>
           <li>
		    <div class="com_release_name"><i class="ff0">*</i> 工作地点</div>
             <div class="com_release_cont">
             <div class="com_release_select com_release_selectw145">
					  <div class="layui-input-inline ">
						<select name="provinceid" lay-filter="citys" id="provinceid">
						  <option value="">请选择</option>
						  {yun:}foreach from=$city_index key=j item=v{/yun}
						  <option value="{yun:}$v{/yun}" {yun:}if $row.provinceid == $v{/yun} selected{yun:}/if{/yun}
							>{yun:}$city_name[$v]{/yun}
						  </option>
						  {yun:}/foreach{/yun}
						</select>
					  </div>
                      			  </div>
                                   <div class="com_release_select com_release_selectw145">
					  <div class="layui-input-inline">
						<select name="cityid" lay-filter="citys" id="cityid">
						  <option value="">请选择</option>
						  {yun:}foreach from=$city_type[$row.provinceid] key=j item=v{/yun}
						  <option value="{yun:}$v{/yun}" {yun:}if $row.cityid==$v{/yun} selected{yun:}/if{/yun}
							>{yun:}$city_name[$v]{/yun}
						  </option>
						  {yun:}/foreach{/yun}
						</select>
					  </div>
					    </div>
                        
					    <div class="com_release_select com_release_selectw145">
                    <div class="layui-input-inline" id="cityshowth" {yun:}if $row.three_cityid<1{/yun}style="display:none"{yun:}/if{/yun}>
						<select name="three_cityid" id="three_cityid">
						  <option value="">请选择</option>
						  {yun:}foreach from=$city_type[$row.cityid] key=j item=v{/yun}
						  <option value="{yun:}$v{/yun}" {yun:}if $row.three_cityid==$v{/yun} selected{yun:}/if{/yun}
							>{yun:}$city_name[$v]{/yun}
						  </option>
						  {yun:}/foreach{/yun}
						</select>
					  </div>
				    </div>
              </div>
            </li>
         
            <li>
				<div class="com_release_name"><i class="ff0">*</i> 薪资待遇</div>
				
				<div class="com_release_cont">
					<div class="com_release_cont_textw130">
						<input type="text" size="5" id="minsalary" name="minsalary" {yun:}if $row.minsalary{/yun}value="{yun:}$row.minsalary{/yun}"{yun:}/if{/yun}  onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" class="layui-input" placeholder="最低薪资"{yun:}if !$row.minsalary&&!$row.maxsalary&&$row.id{/yun} disabled="disabled"{yun:}/if{/yun}>
						<span class="com_release_cont_dw">元/月</span>
					</div>
					
					<span class="com_release_cont_line">- </span>

					<div class="com_release_cont_textw130">
						<input type="text" size="5" id="maxsalary" name="maxsalary" {yun:}if $row.maxsalary{/yun}value="{yun:}$row.maxsalary{/yun}"{yun:}/if{/yun} onkeyup="this.value=this.value.replace(/[^0-9]/g,'')"  class="layui-input" placeholder="最高薪资"{yun:}if !$row.minsalary&&!$row.maxsalary&&$row.id{/yun} disabled="disabled"{yun:}/if{/yun}>
						<span class="com_release_cont_dw">元/月</span>
					</div>
 					
					<input type="checkbox" id="salary_type" name="salary_type"  title="面议" value="1" {yun:}if !$row.minsalary&&!$row.maxsalary&&$row.id{/yun} checked="checked"{yun:}/if{/yun} lay-filter="salary_type" lay-skin="primary" />   
 			
				</div> 

            </li>
            <li>
				<div class="com_release_name"><i class="ff0">*</i> 职位描述</div>
				<div class="com_release_cont">
              
					<div class="Description" style="display:none;">
						<div class="Description_icon">
							<i class="Description_icon_i"></i>
							<div class="Description_box" style="display:none;">
								<i class="Description_icon_i_j"></i>
								点击职位链接，为你推荐的职位要求模板复制到编辑区域内！<br>您也可以编辑，直至完美！
							</div>
						</div>
						<div class="Description_box_mb">模板：<span id="JobRequInfoTemplate"></span></div>
					</div>
					<div class="clear"></div>
 					<script id="description" name="description" type="text/plain" style="width:500px; height:180px;"> {yun:}$row.description{/yun} </script>
					<span id="by_description" class="errordisplay">不能为空</span>
				</div>
            </li>
            
            
          <div class="com_release_tip"><span class="com_release_tip_bg">完善职位信息，让求职者更了解您的职位需求，增加简历投递量</span></div>
         
            
            <li style="display: none;">
           <div class="com_release_name">从事行业</div>
               <div class="com_release_cont">
 				
				 
				  <div class="layui-input-inline">
					<select name="hy" lay-filter="hy">
					  <option value="">请选择</option>
					  {yun:}foreach from=$industry_index key=j item=v{/yun}
					  <option value="{yun:}$v{/yun}" {yun:}if $row.hy == $v{/yun} selected{yun:}/if{/yun}
						>{yun:}$industry_name[$v]{/yun}
					  </option>
					  {yun:}/foreach{/yun}
					</select>
				 
				</div>

               </div>
            </li>
           <li style="display:none;">
             <div class="com_release_name">招聘人数</div>
         <div class="com_release_cont">
			
				  <div class="layui-input-inline">
					<select name="number" lay-filter="number">
					  <option value="">请选择</option>
					  {yun:}foreach from=$comdata.job_number key=j item=v{/yun}
					  <option value="{yun:}$v{/yun}" {yun:}if $row.number == $v{/yun} selected{yun:}/if{/yun}
						>{yun:}$comclass_name[$v]{/yun}
					  </option>
					  {yun:}/foreach{/yun}
					</select>
				
				</div>
              </div>
            </li>
             <li>
            <div class="com_release_name">工作经验</div>
              <div class="com_release_cont">
              
				  <div class="layui-input-inline">
					<select name="exp" lay-filter="exp">
 					  {yun:}foreach from=$comdata.job_exp key=j item=v{/yun}
					  <option value="{yun:}$v{/yun}" {yun:}if $row.exp==$v{/yun} selected{yun:}/if{/yun}
						>{yun:}$comclass_name[$v]{/yun}
					  </option>
					  {yun:}/foreach{/yun}
					</select>
				
				</div>
              </div>
            </li>
            <li style="display: none;">
             <div class="com_release_name">到岗时间</div>
               <div class="com_release_cont">
               
				  <div class="layui-input-inline">
					<select name="report" lay-filter="report">
 					  {yun:}foreach from=$comdata.job_report key=j item=v{/yun}
					  <option value="{yun:}$v{/yun}" {yun:}if $row.report == $v{/yun} selected{yun:}/if{/yun}
						>{yun:}$comclass_name[$v]{/yun}
					  </option>
					  {yun:}/foreach{/yun}
					</select>
				 
				</div>
              </div>
            </li>
         <li>
             <div class="com_release_name">年龄要求</div>
              <div class="com_release_cont">
            
				  <div class="layui-input-inline">
					<select name="age" lay-filter="age">
					  <option value="">请选择</option>
					  {yun:}foreach from=$comdata.job_age key=j item=v{/yun}
					  <option value="{yun:}$v{/yun}" {yun:}if $row.age == $v{/yun} selected{yun:}/if{/yun}
						>{yun:}$comclass_name[$v]{/yun}
					  </option>
					  {yun:}/foreach{/yun}
					</select>
				
				</div>
              </div>
            </li>
         <li style="display: none;">
             <div class="com_release_name">性别要求</div>
               <div class="com_release_cont">
			
				  <div class="layui-input-inline">
					<select name="sex" lay-filter="sex">
 					  {yun:}foreach from=$arr_data.sex key=j item=v{/yun}
					  <option value="{yun:}$j{/yun}" {yun:}if $arr_data.sex[$row.sex] == $v{/yun} selected{yun:}/if{/yun}
						>{yun:}$v{/yun}
					  </option>
					  {yun:}/foreach{/yun}
					</select>
				
				</div>
              </div>
            </li>
          <li>
              <div class="com_release_name">学历</div>
              <div class="com_release_cont">
              
				  <div class="layui-input-inline">
					<select name="edu" lay-filter="edu">
 					  {yun:}foreach from=$comdata.job_edu key=j item=v{/yun}
					  <option value="{yun:}$v{/yun}" {yun:}if $row.edu == $v{/yun} selected{yun:}/if{/yun}
						>{yun:}$comclass_name[$v]{/yun}
					  </option>
					  {yun:}/foreach{/yun}
					</select>
					
				</div>
              </div>
            </li>
          <li style="display: none;">
             <div class="com_release_name">婚姻状况</div>
               <div class="com_release_cont">
              
				  <div class="layui-input-inline">
					<select name="marriage" lay-filter="marriage">
 					  {yun:}foreach from=$comdata.job_marriage key=j item=v{/yun}
					  <option value="{yun:}$v{/yun}" {yun:}if $row.marriage == $v{/yun} selected{yun:}/if{/yun}
						>{yun:}$comclass_name[$v]{/yun}
					  </option>
					  {yun:}/foreach{/yun}
					</select>
				  </div>
			
              </div>
            </li>
           
			<li>
              <div class="com_release_name">福利待遇</div>
				
				<div class="layui-form-item">
			
		        <div class="layui-input-block">
		          {yun:}foreach key=j item=v from=$comdata.job_lang{/yun}
		          <input name="lang[]" id="lang{yun:}$v{/yun}" title="{yun:}$comclass_name[$v]{/yun}" value="{yun:}$v{/yun}" {yun:}if in_array($v,$row.lang){/yun} checked="checked" {yun:}/if{/yun} type="checkbox" lay-skin="primary">
		        {yun:}/foreach{/yun}
		        
		        </div>
		      </div>

            </li>

            <li>
              <div class="com_release_name">职位标签</div>
				
				<div class="layui-form-item">
			
		        <div class="layui-input-block">
		          {yun:}foreach key=j item=v from=$comdata.job_label{/yun}
		          <input name="label[]" id="label{yun:}$v{/yun}" title="{yun:}$comclass_name[$v]{/yun}" value="{yun:}$v{/yun}" {yun:}if in_array($v,$row.label){/yun} checked="checked" {yun:}/if{/yun} type="checkbox" lay-skin="primary">
		        {yun:}/foreach{/yun}
		        
		        </div>
		      </div>

            </li>
          
          </ul>
          </div>
            <div class="com_release_tip"><span class="com_release_tip_bg">联系方式默认为基本信息里的企业联系方式</span></div>
	<div class="job_touch">
		<input type="hidden" name="islink" id="islink" value="{yun:}if $row.islink{/yun}{yun:}$row.islink{/yun}{yun:}else{/yun}1{yun:}/if{/yun}" />
		<div class="admin_job_js_w_list fl" style="margin-top:20px;">
			<div class="admin_job_js_list_ft mt10 fl"><span style="width:100%;">联系方式</span></div>
			<div class="admin_job_js_list_rt fl">
				<span class="admin_job_style {yun:}if $row.islink==1|| $row.islink==''{/yun}admin_job_style_n{yun:}/if{/yun} fl" onclick="choice('1','link')" id="islink1">
					使用企业联系方式（{yun:}$company.linkman{/yun}&nbsp;{yun:}if $company.linktel{/yun}{yun:}$company.linktel{/yun}{yun:}else{/yun}{yun:}$company.linkphone{/yun}{yun:}/if{/yun}）
				</span>
				<span class="admin_job_style {yun:}if $row.islink==2{/yun}admin_job_style_n{yun:}/if{/yun} fl" onclick="choice('2','link')" id="islink2">
					使用新联系方式
				</span>
				<div id="newlink" {yun:}if $row.islink!=2 {/yun} style="display:none;" {yun:}/if{/yun} >
					<div class="job_touch_other mt10 fl">
						
						<div class="layui-form-item">
						<div class="job_touch_other_tit fl">使用新联系方式</div>
							<div class="layui-input-inline">
								<input type="text" {yun:}if $job_link.link_man&&$row.islink=='2'{/yun}value="{yun:}$job_link.link_man{/yun}"{yun:}/if{/yun} placeholder="请输入联系人" id="link_man" name="link_man" class="layui-input"> 
							</div>
							<div class="layui-input-inline">
								<input type="tel" {yun:}if $job_link.link_moblie&&$row.islink=='2'{/yun}value="{yun:}$job_link.link_moblie{/yun}"{yun:}/if{/yun} id="link_moblie" name="link_moblie" placeholder="请输入联系电话" lay-verify="phone" onkeyup="this.value=this.value.replace(/[^0-9-]/g,'')" class="layui-input">
							</div>
							<div class="layui-input-inline">
								<input name="type_switch" lay-filter="type_switch" lay-skin="switch" lay-text="开启|关闭" type="checkbox" >
								<input name="tblink" id="tblink" type="hidden" value="">
 								<div class="layui-form-mid layui-word-aux">同步到所有职位</div>
							</div>
 						</div>
					</div>
				</div> 
			</div>
		</div>    
	</div>
	<div class="admin_job_js_w_list fl">
		<div class="admin_job_js_list_ft fl"><span style="width:100%;">&nbsp;</span></div>
		<span class="admin_job_style {yun:}if $row.islink==3{/yun}admin_job_style_n{yun:}/if{/yun} fl" onclick="choice('3','link')" id="islink3">
			不向求职者展示联系方式（不想受到骚扰）
		</span>  
	</div>
                
             <div class="admin_job_js_w_list fl" style="margin-top:20px; display: none;">
                 <input type="hidden" name="isemail" id="isemail" value="{yun:}if $row.isemail{/yun}{yun:}$row.isemail{/yun}{yun:}else{/yun}{yun:}if $company.linkmail{/yun}1{yun:}else{/yun}0{yun:}/if{/yun}{yun:}/if{/yun}" />
                 <div class="admin_job_js_list_ft mt10 fl"><span style="width:100%;">接收简历的邮箱</span></div>
                 <div class="admin_job_js_list_rt fl">
                     {yun:}if $company.linkmail{/yun}<span class="admin_job_style {yun:}if $row.isemail==1||!$row.isemail{/yun}admin_job_style_n{yun:}/if{/yun} fl" onclick="choice('1','email')" id="isemail1">使用企业邮箱（{yun:}$company.linkmail{/yun}）</span>{yun:}/if{/yun}
				     <span class="admin_job_style {yun:}if $row.isemail==2{/yun}admin_job_style_n{yun:}/if{/yun} fl" onclick="choice('2','email')" id="isemail2">使用新邮箱</span> 
			
				    <div class="" id="newemail" style="padding:10px 10px 10px 0px;{yun:}if $row.isemail!=2{/yun}display:none;{yun:}/if{/yun}">
                         <span class="admin_job_style admin_job_style_n fl" style="height:90px;">
                               <div class="admin_job_js_wr fl">使用新邮箱</div>
                               <input type="text" value="{yun:}$job_link.email{/yun}" placeholder="请填写新邮箱" class="payment_fp_touch_text" id="email" name="email">				         
                         </span>
                    
                     	 </div></div>
             
             <div class="admin_job_js_w_list fl">
                <div class="admin_job_js_list_ft fl"><span style="width:100%;">&nbsp;</span></div>
				 <span class="admin_job_style {yun:}if $row.isemail==3{/yun}admin_job_style_n{yun:}/if{/yun} fl" onclick="choice('3','email')" id="isemail3">不需要将收到的简历发送到邮箱</span> 
				
             </div>
             </div> <div class="clear"></div>
			
             
         <div class="clear"></div>
          <div class=admin_submit>
                <div class="admin_job_js_list_ft fl"><span style="width:100%;">&nbsp;</span></div>
          <div class=sub_btn>
			<input type="hidden" id="logid" name="logid">
              <input class="btn_01"  id="submitBtn"type="submit" name="submitBtn" value=" 提 交 操 作 ">
              <input name="jobcopy" value="{yun:}$smarty.get.jobcopy{/yun}" type="hidden"/>
           {yun:}if $smarty.get.id{/yun}
            <input id="id"name="id" value="{yun:}$row.id{/yun}" type="hidden"/>
            {yun:}/if{/yun}
            <input name="state" value="{yun:}$row.state{/yun}" type="hidden"/>
             <input id="save"name="save" value="{yun:}$row.name{/yun}" type="hidden"/>
          </div> <div class="clear"></div>
			</div>
        </form>
     
    </div>  </div>

       </div>
  
  </div>
</div>  {yun:}if !$smarty.get.id{/yun}
     <div class="text_tips_bc">
   <div class="text_tips_bc_h1"> 保存临时信息</div>
   <div class="text_tips_bc_cont"> 
     {yun:}if $save.time{/yun}
     <div class="text_tips_bc_l">信息已于{yun:}$save.time{/yun}保存</div>
     {yun:}/if{/yun}
     <div> 
     <div class="text_tips_bc_r">
     <div class="text_tips_bc_time"> <div class="text_tips_bc_time_c">  <span class="text_tips_bc_time_n" id="totalSecond"></span>s</div>后将自动保存已填信息</div>
     <a id="atime"href="javascript:;" onclick="savejobform();" class="text_tips_bc_bth">临时保存</a>
     </div>
     </div>
     </div>
      </div>
    {yun:}/if{/yun}

<input type='hidden' id='jobid' value=''>
<div class="job_tck_box" id="addjob" style="display:none;">
	<div class="job_box_div" style="width:440px;"> 
        <div class="jonadd_prompt_icon"></div>
		<div class="jonadd_prompt">
     <div class="jonadd_prompt_p"><span id="returnmsg" class="job_add_success">职位发布成功！</span></div>
        
        <a href="javascript:void(0)"  onclick="addjob_continue('{yun:}$uid{/yun}','{yun:}$config.integral_job{/yun}');return false;" class="job_add_continue">继续发布职位</a>
        </div>
        
        <div class="jonadd_prompt_img" id="qrcodeimg">
			<img src='{yun:}$config.sy_weburl{/yun}/{yun:}$config.sy_wx_qcode{/yun}'  width='80' height='80'>
            <div class="jonadd_prompt_img_p">微信公众号</div>
        </div>
        
       
        <div class="jonadd_prompt_share_jy"  id="moreget">为了吸引更多求职者的关注，建议您设置：
		<a href="javascript:void(0)" onclick="urgent('{yun:}$row.id{/yun}','{yun:}if $row.urgent=='1'{/yun}{yun:}$row.urgent_time|date_format:'%Y-%m-%d'{/yun}{yun:}else{/yun}0{yun:}/if{/yun}')">紧急职位</a>
		<a href="javascript:void(0)" onclick="autojobs('','{yun:}$row.id{/yun}','{yun:}$row.autodate{/yun}');">自动刷新</a>
		<input type="hidden" id="autodj" value="{yun:}$config.job_auto{/yun}"/>
		</div>  
         <div class="jonadd_prompt_share">让企业品牌更红，让招聘效果更高，立即分享转发招聘职位吧</div>
        <div class="jonadd_prompt_share_opt" id="share" style="height:50px;"></div>
	</div>
	
</div>
<script language=javascript src='{yun:}$config.sy_weburl{/yun}/data/plus/city.cache.js?v={yun:}$config.cachecode{/yun}'></script>
<script language=javascript src='{yun:}$config.sy_weburl{/yun}/js/city.js?v={yun:}$config.cachecode{/yun}'></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.config.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.all.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script>
layui.use(['form', 'layer', 'laydate'], function(){
    var form = layui.form,
		layer = layui.layer,
		laydate = layui.laydate,
		$ = layui.$;  

	form.on('select(moneytype)', function(data){
      if(data.value == 1){
        $("#money_1").show();
        $("#money_2").hide();
      }else{
        $("#money_2").show();
        $("#money_1").hide();
      }
    });
 
	form.on('switch(type_switch)', function(data){
      var v = this.checked ? 1 : 2;
      $("#tblink").val(v);
    });

 	form.on('checkbox(salary_type)', function(data){
		if(data.elem.checked){
			$("#minsalary").attr("disabled","disabled");
			$("#maxsalary").attr("disabled","disabled");
			$("#minsalary").val(0);
			$("#maxsalary").val(0);
		}else if(!data.elem.checked){
			$("#minsalary").removeAttr("disabled","disabled");
			$("#maxsalary").removeAttr("disabled","disabled");
			$("#minsalary").val('{yun:}$row.minsalary{/yun}');
			$("#maxsalary").val('{yun:}$row.maxsalary{/yun}');
		}
    });

  });

	function addjob_continue(uid,integral_job){
		var gourl='index.php?c=jobadd';
		var url = weburl + '/index.php?m=ajax&c=ajax_day_action_check';
		$.post(url,
			{'type': 'addjob'},
			function(data){
				data = eval('(' + data + ')');
				if(data.status == -1){
					layer.msg(data.msg, 2, 8);
				}else if(data.status == 1){
					
					var addurl = 'index.php?c=jobadd&act=getJobNum';
					$.post(addurl,{uid:uid},function(data1){
 
 						if(data1 == 1 || (integral_job==0 && data1!=0)){
							window.location.href=gourl;
							window.event.returnValue = false;
							return false;
						}else if(data1 == 2){
							var msg='套餐已用完，继续操作将会消费'+integral_job+'元，您还可以<a href="index.php?c=right&act=added" style="color:red">购买增值包</a>，是否继续？';
							layer.confirm(msg, function(){
 								var height="300px";
 								$.layer({	
									type : 1,
									title : '发布职位',
									closeBtn : [0 , true],
									border : [10 , 0.3 , '#000', true],
									area : ['480px',height],
									page : {dom : '#issue_job'}
								});
 							});

						}else if(data1==0){
							var msg='会员已到期，您可以<a href="index.php?c=right" style="color:red">购买会员</a>，是否继续？';

							layer.confirm(msg, function(){
								window.location.href="index.php?c=right"; 
							});  
							
						}
					});
				}
			}
		);
	}
	var editor = UE.getEditor('description',{
		toolbars:[[ 'Source','|', 'Undo', 'Redo','Bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'fontfamily', 'fontsize',  'forecolor', 'backcolor', 'removeformat', 'autotypeset', 'pasteplain', '|','insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|','simpleupload', '|','link', 'unlink', 'indent', '|','justifyleft', 'justifycenter', 'justifyright', 'justifyjustify']],wordCount:false,elementPathEnabled:false,initialFrameHeight:200
	});

 	var second = 0;
	window.setInterval(function () {
		second ++;
	}, 1000);

	var url     = location.href, 
		refer   = document.referrer, 
		timeIn  = Math.ceil(new Date().getTime()/1000); 
	{yun:}if $smarty.get.id{/yun}
		var opera=32;
	{yun:}else{/yun}
		var opera=31;
	{yun:}/if{/yun}
	$(function(){
		setTimeout(function(){ 
			$.post('index.php?c=log',{url:url,refer:refer,timeIn:timeIn,second:2,opera:opera},function(data){
				if(data){
					$("#logid").val(data);
				}
			})
		},2000);
		
    }) 
	
	window.onbeforeunload = function(){
		var logid = $("#logid").val();
 		if(second>2){ 
			$.post('index.php?c=log&act=gxLog',{id:logid,second:second},function(data){
				if(data) {
					return false;
				}
			})
		}
   	}
</script>

{yun:}include file="$comstyle/jobserver.htm"{/yun}
{yun:}include file="$comstyle/footer.htm"{/yun}